<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../Templates/SubFolderTemplate.xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">
    <ui:define name="head-title">
        <title>View Sale Forecast | Merlion's ERP System</title>
    </ui:define>
    
    <ui:define name="content">
        
        <f:view beforePhase="#{viewsf.initView}">
            <p:panel id="panel" header="View Sale Forecasts">
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <p:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 

                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 

                <p:messages />
                <h:form id="formMain" prependId="false">
                    <h:outputLabel for="startmonth" style="font-weight: bold" value="Select Start Month: " /> 
                    <h:selectOneMenu id="startmonth" value="#{viewSaleForecastManagerBean.startMonthStr}">
                        <f:selectItems value ="#{viewSaleForecastManagerBean.saleForecastMonthsStr}"/>
                    </h:selectOneMenu>
                    <span> </span>
                    <h:outputLabel for="endmonth" style="font-weight: bold" value="Select End Month: " /> 
                    <h:selectOneMenu id="endmonth" value="#{viewSaleForecastManagerBean.endMonthStr}">
                        <f:selectItems value ="#{viewSaleForecastManagerBean.saleForecastMonthsStr}"/>
                    </h:selectOneMenu>
                    <span> </span><p:commandButton id="retrieve" value="Retrieve Data" update="panel" actionListener="#{viewSaleForecastManagerBean.retrieveData(event)}" ajax="true" />
                    <br/><br/>
                </h:form>    
            </p:panel>
        </f:view>
    
    </ui:define>

</ui:composition>
